<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建虚拟dom</title>
    <!-- react核心组件库 -->
    <script src="../其他/js/react.development.js"></script>
    <script src="../其他/js/react-dom.development.js"></script>

    <!-- Don't use this in production: -->
    <script src="../其他/js/babel.min.js"></script>

</head>
</head>

<body>
    <div id="root"></div>


    <!-- 此处一定要写babel -->
    <script type="text/javascript">
    // 第一种
        let VDOM = <h1 id="title">Hello, world!</h1>; 
        // 第二种
        // let VDOM = React.createElement('h1', {id: 'title'}, 'Hello, React')
        ReactDOM.render(VDOM, document.getElementById('root'));

    </script>
</body>

</html>